package com.ys.everydaynews.view

import android.view.View
import android.widget.TextView
import com.ys.everydaynews.R

class Photo_Dialog : BaseDialogFragment() {
    private var mDialogFragmentListener: DialogFragmentListener? = null
    override fun initView(view: View) {
        val tvPic: TextView = view.findViewById(R.id.tv_storage)
        val tvCream: TextView = view.findViewById(R.id.tv_cream)
        val tvCancel: TextView = view.findViewById(R.id.tv_cancel)
        tvPic.setOnClickListener {
            mDialogFragmentListener!!.onDialog(1)
            dismiss()
        }
        tvCream.setOnClickListener {
            mDialogFragmentListener!!.onDialog(2)
            dismiss()
        }
        tvCancel.setOnClickListener {
            mDialogFragmentListener!!.onDialog(3)
            dismiss()
        }
    }

    override fun initData() {
    }

    override fun getLayout(): Int = R.layout.dialog_photo

    fun setDialogFragmentListener(mDialogFragmentListener: DialogFragmentListener) {
        this.mDialogFragmentListener = mDialogFragmentListener
    }
}
